﻿<%@ page language="java" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@page import="school.*,school.dao.*,school.entity.*,util.*" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>注册信息</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
  </head>
	<body>
	<%
	    request.setCharacterEncoding("UTF-8");
	    String name = request.getParameter("name");
	    String pass = request.getParameter("pass");
	    String sex = request.getParameter("sex");
	    String city = request.getParameter("city");
	    String qq = request.getParameter("qq");
	    int gradeid =Integer.parseInt( request.getParameter("grade"));
	    
	%>

		        <%
		        MySqlStudentDaoImpl obj = new MySqlStudentDaoImpl();
		        Student stu=new Student();
		        stu.setFromcity(city);
		        stu.setStuname(name);
		        stu.setGradeid(gradeid);
		        stu.setPass(pass);
		        stu.setSex(sex);
		        stu.setQq(qq);
		        obj.add(stu);
		        out.print("注册成功！");
		        %>
		        </td>
		    </tr>
		</table>
	</div>
	</body>
</html>
